package dem1;

import java.util.Arrays;

/**
 * Created with Intellij IDEA.
 * Description:
 * User: 33013
 * Date: 2023-03-29
 * Time: 14:12
 */
public class MyArrayList<E> {
    Object[] object = new Object[10];
    private int size;

    public int getSize() {
        return size;
    }

    public E getObject(int dex) {
        return (E)object[dex];
    }

    public boolean add(E e){
        object[size] = e;
        size++;
        return true;
    }

    @Override
    public String toString() {
        return "MyArrayList{" +
                "object=" + Arrays.toString(object) +
                ", size=" + size +
                '}';
    }
}
